package kaka.controls.datagrid
{
	import kaka.controls.datagrid.SuperDataGridColumn;
	
	import kaka.controls.datagrid.column.FlexDeamonColumn;
	import kaka.controls.datagrid.factory.CreateFactory;
	
	import mx.controls.DataGrid;

	public class DataGridEx extends DataGrid
	{
		
		public function DataGridEx()
		{
			super();
			this.doubleClickEnabled=true;
		}
		public function createDataGrid(className:Class):void
		{
			var item:IColumn=CreateFactory.create(className);
			var itemNum:int=item.getShowItem().length;
			var _columns:Array=new Array();
			for(var i:int=0;i<itemNum;i++)
			{
				var itemColumn:SuperDataGridColumn=new SuperDataGridColumn();
				itemColumn.initData(i,item);
				_columns.push(itemColumn);
			}
			this.columns=_columns;
		}
	}
}